home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / trap.h < prev    next >
C/C++ Source or Header  |  1994-04-05  |  2KB  |  65 lines

  1. /* trap.h -- data structures used in the trap mechanism. */
  2.  
  3. /* Copyright (C) 1993 Free Software Foundation, Inc.
  4.  
  5.    This file is part of GNU Bash, the Bourne Again SHell.
  6.  
  7.    Bash is free software; you can redistribute it and/or modify it under
  8.    the terms of the GNU General Public License as published by the Free
  9.    Software Foundation; either version 2, or (at your option) any later
  10.    version.
  11.  
  12.    Bash is distributed in the hope that it will be useful, but WITHOUT ANY
  13.    WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15.    for more details.
  16.  
  17.    You should have received a copy of the GNU General Public License along
  18.    with Bash; see the file COPYING.  If not, write to the Free Software
  19.    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  20.  
  21. #if !defined (__TRAP_H__)
  22. #define __TRAP_H__
  23.  
  24. #include "stdc.h"
  25.  
  26. #if !defined (SIG_DFL)
  27. #include <sys/types.h>
  28. #include <signal.h>
  29. #endif /* SIG_DFL */
  30.  
  31. #if !defined (NSIG)
  32. #define NSIG 64
  33. #endif /* !NSIG */
  34.  
  35. #define NO_SIG -1
  36. #define DEFAULT_SIG SIG_DFL
  37. #define IGNORE_SIG  SIG_IGN
  38.  
  39. #define signal_object_p(x) (decode_signal (x) != NO_SIG)
  40.  
  41. extern char *trap_list[NSIG];
  42.  
  43. /* Externally-visible functions declared in trap.c. */
  44. extern void initialize_traps __P((void));
  45. extern void run_pending_traps __P((void));
  46. extern void maybe_set_sigchld_trap __P((char *));
  47. extern void set_sigchld_trap __P((char *));
  48. extern void set_signal __P((int, char *));
  49. extern void restore_default_signal __P((int));
  50. extern void ignore_signal __P((int));
  51. extern void run_exit_trap __P((void));
  52. extern void free_trap_strings __P((void));
  53. extern void reset_signal_handlers __P((void));
  54. extern void restore_original_signals __P((void));
  55.  
  56. extern char *signal_name __P((int));
  57.  
  58. extern int decode_signal __P((char *));
  59. extern void run_interrupt_trap __P((void));
  60. extern int maybe_call_trap_handler __P((int));
  61. extern int signal_is_trapped __P((int));
  62. extern int signal_is_special __P((int));
  63.  
  64. #endif /* __TRAP_H__ */
  65.